This section provides some more detail about our sample and how we calculate distances, centroids, and dispersion parameters.
Our analysis includes reported ZIP codes that overalap (at all) with Travis County and the seven neighboring counties.
We are calculating and reporting distances in miles, which is a little complicated when using longitude and latitude. Latitude degrees (as distance) are constant in miles (68.9 miles = one latitude degree), but due to globe projection onto 2D space, longitude degrees convert to fewer miles as one moves away from the equator. A very close approximation for converting longitude degrees to miles can be calculated for any given latitude by converting the varying distances represented by a degree of longitude into the constant distances (68.9 miles) represented by a degree of latitude. For Travis County’s reported latitude (30.2097) the conversion is the cosine of the latitude expressed in radians:
\[0.8641896 = cos(30.2097\times \pi /180)\] Thus at Travis County’s Latitude:
\[Miles\:per\:Longitude\:Degree=Longitude\:Degrees\times 68.9 \times 0.8641896= 59.54267\] Similarly, if we want the physical distance expressed in longitude degrees that is equal to the physical distance in latitude degrees at Travis County’s latitude, the conversion is:
\[1.157153 = \frac{1}{cos(30.2097\times \pi /180)}\]
This generates all of the data sets used to create the maps, calculate centroids, and calculate the “spread” or dispersion of the data. I subset the ZIP codes to those in the map above. Thus, folks who report a ZIP code outside of Texas, as well as those within Texas that are not in those ZIP codes, are not included in the centroid nor “spread” calculations.
For all agencies (pooled annually) and each agency-year, the population centroid (average location) of participants is calculated based on the HUD’s publicly available data set. Each person reporting a given ZIP code is placed at the ZIP code’s constant centroid. The data is from 2021. To calculate the centroid, I take the simple average of each annual longitude and latitude. I use this measure to place the circle on the map later.
To get the average distance from the centroid, annually, I must adjust the longitude, as one degree/unit of longitude is only equal in physical distance to one degree of latitude at the equator (assuming a spherical earth for simplicity). After adjusting for longitude degrees shrinkage, I generate the average distance among all participants in both degrees (this determines the size of the circle) and miles (for the subtitle of each map).
The calculation of distance in miles is simple, positive Euclidean distance (assuming a spherical earth) after adjusting the longitude units to be equal to latitude degrees in physical distance for TC’s latitude (1.157153, defined above) and multiplying by a reasonable proxy for miles per latitude degree (68.9) for ZIP entry \(z_i\) at longitude \(x_i\) and latitude \(y_i\) and annual (agency) centroid \(c\) at coordinates \((c_1, c_2)\):
\[ Miles Distance_i = ||z_i - c|| = \sqrt{(1.157153 \times 68.9 \times(x_i - c_1))^2 + (68.9 \times(y_i - c_2))^2} \]
For miles and degrees, the average distance from the annual centroid is a simple average of the adjusted distances:
\[ Average\:Distance = \frac{1}{n}\sum_{i=1} ^{n}||z_i-c||\]
Reading layer
ne_10m_roads_north_america' from data sourceC:ProjectsCounty_10m_roads_north_america.shp’
using driver `ESRI Shapefile’ Simple feature collection with 49183
features and 13 fields Geometry type: MULTILINESTRING Dimension: XY
Bounding box: xmin: -176.764 ymin: 14.59075 xmax: -52.64725 ymax:
70.29668 Geodetic CRS: WGS 84
, label3 = Count 2016, label4 =
Count 2022)